1
general::
Phrase(s): a rotten apple
a single bad person or thing. • There always is a rotten apple to spoil it for the rest of us. • Tom sure has turned out to be the rotten apple.
McGrawhill's American Idioms And Phrasal Verbs
2
general::
A bad individual among many good ones, especially one that spoils the group. For example, The roommates are having problems with Edith? she's the one rotten apple of the bunch. This expression is a shortening of the proverb a rotten apple spoils the barrel, coming from a 14th-century Latin proverb translated as "The rotten apple injures its neighbors." The allusion in this idiom is to the spread of mold or other diseases from one apple to the rest. In English the first recorded use was in Benjamin Franklin's Poor Richard's Almanack (1736).
American Heritage Idioms